use redis_protocol::resp2::prelude::Frame;

use crate::prelude::*;
use crate::command::EXECUTORS;
pub struct Ping();
impl CommandService for Ping {
    fn process(&self, _s: &Arc<dyn StorageService>, _param: Frame) -> Option<Frame>
    {
        Some(Frame::SimpleString(String::from("pong")))
    }
}


pub struct Comm();
impl CommandService for Comm {
    fn process(&self, _s: &Arc<dyn StorageService>, _param: Frame) -> Option<Frame>
    {
        let mut constuctor = FrameConstructor::new();
        
        for (key, _) in EXECUTORS.iter() {
            constuctor.append_string(key);
        }

        Some(constuctor.construct_frame())
    }
}